@import "JetBrains-Mono.scss";

:root {
    // brand colors
    --c-brand: #3F51B5;
    --c-brand-light: #5C6BC0;

    // background colors
    --c-bg: white;
    --c-bg-light: #F5F5F5; //亮背景色，用于表格，代码框，提示等
    --c-bg-lighter: #EEEEEE; //更亮背景色，用于小代码框，代码框内高亮
    --c-bg-dark: #E0E0E0;
    --c-bg-darker: #E0E0E0;

    // text colors
    --c-text: black;
    --c-text-lighter: #1A2364;
    --c-text-quote: #616161;

    // code blocks vars
    --code-ln-wrapper-width: 2rem;
    --code-bg-color: var(--c-bg-light);
    --code-hl-bg-color: #E0E0E0;

    // border colors
    --c-border: #E0E0E0;
    --c-border-dark: #E0E0E0;

    // custom container colors
    --c-tip: var(--c-brand-light);
    --c-details-bg: var(--c-bg-light) !important;

    // badge component colors
    --c-badge-tip-text: white !important;
    --c-badge-warning-text: white !important;
    --c-badge-danger-text: white !important;

    // font vars
    --font-family-code: "JetBrains Mono", "JetBrains Mono Online", Monaco, "Andale Mono", "Ubuntu Mono", monospace;
    --font-family: system-ui, "HarmonyOS Sans SC", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
        Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
    // --content-width: 960px; //增大宽度
}

html.dark {
    // brand colors
    --c-brand: #5C6BC0;
    --c-brand-light: #7986CB;

    // background colors
    --c-bg: #212121;
    --c-bg-light: #303030;
    --c-bg-lighter: #303030;
    --c-bg-dark: #424242;
    --c-bg-darker: #424242;

    // text colors
    --c-text: #F5F5F5;
    --c-text-lighter: #C5CAE9;

    // code blocks vars
    --code-hl-bg-color: var(--c-bg-darker);

    // border colors
    --c-border: #424242;
    --c-border-dark: #424242;

    // custom container colors
    --c-tip: var(--c-brand)
}

.pictureName {
    text-align: center;
    font-size: 14px;
    opacity: 0.5;
    margin-top: 0 !important;
}

.badge {
    color: var(--c-badge-tip-text);
}

//缩小表格边距
th,
td {
    padding: 0.6em 0.8em;
}

tr:nth-child(2n) {
    //background-color: rgba(0, 0, 0, 0);
}

code {
    padding: 0.2em 0.4em;
}

//给代码框设置自适应主题
.theme-default-content pre code,
.theme-default-content pre[class*=language-] code {
    color: black;
}

.dark .theme-default-content pre code,
.dark .theme-default-content pre[class*=language-] code {
    color: #E0E0E0;
}

//缩小代码框左边间距
div[class*=language-].line-numbers-mode pre {
    padding-left: 0.6rem;
}

//缩小代码行数上下边距
div[class*=language-].line-numbers-mode .line-numbers {
    padding-top: 0.45rem;
}

//缩小代码高亮上下边距
div[class*=language-] .highlight-lines {
    padding-top: 0.5rem;
}

//缩小代码框上下间距
.theme-default-content pre,
.theme-default-content pre[class*=language-] {
    padding: 0.5rem 2rem;
    padding-left: 1rem;
    margin: 0.8rem 0;
}

//缩小提示框横向边距
.custom-container.tip,
.custom-container.warning,
.custom-container.danger {
    padding: 0.1rem 1rem;
}

//代码高亮
.token.string {
    color: #c2185b;
}

.dark .token.string {
    color: #EC407A;
}

.token.punctuation {
    color: #616161;
}

.token.number,
.token.function {
    color: #5C6BC0;
}

.token.operator,
.token.entity,
.token.url {
    color: #616161;
}

.token.comment,
.token.block-comment,
.token.prolog,
.token.doctype,
.token.cdata {
    color: #9E9E9E;
}

.token.comment {
    font-style: italic;
}

.token.boolean,
.token.selector,
.token.important,
.token.atrule,
.token.keyword,
.token.builtin {
    color: #3f51b5;
    font-weight: bold;
}

.code-group__nav-tab {
    color: var(--c-text);
}

html,
body,
div {
    transition: background-color var(--t-color) !important;
}